package com.example.mybatisplusdemo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.mybatisplusdemo.handler.ListVarcharHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author H
 * @date 2022/12/10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("t_user")
public class UserEntity {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String username;
    private String password;
    private Integer gender;
    private Integer age;
    private String tel;
    private String email;
    @TableField(value = "hobby", typeHandler = ListVarcharHandler.class)
    private List<Integer> hobby;
    private String role;
    private Integer isDeleted;
    private LocalDateTime updateTime;
    private LocalDateTime createTime;
    /**
     * 租户id
     */
    private String tenantId;

}
